﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace IronWinter
{
    
    class GameState
    {
        List<Objectives> allObjectives; //All the objective objects relating to the scenario
        List<Player> allPlayers; //All the players contained in the game state. 

        int m_scenario; //integer designating the scenario

        public void initalize(int scenario)
        {
            List<Objectives> allObjectives = new List<Objectives>();
            List<Player> allPlayers = new List<Player>();
            m_scenario = scenario;

        }

        //compiles all units controlled by players and returns the list
        public List<Unit> units
        {
            get {
                List<Unit> merged = new List<Unit>();
                foreach (Player i in allPlayers)
                {
                    merged.AddRange(i.units);
                    merged.AddRange(i.units);
                }
                return merged;
            }
        }
        public List<Building> buildings
        {
            get
            {
                List<Building> merged = new List<Building>();
                foreach (Player i in allPlayers)
                {
                    merged.AddRange(i.buildings);
                    merged.AddRange(i.buildings);
                }
                return merged;
            }
        }

        public List<Objectives> objectives
        {
            get { return allObjectives; }
            set { allObjectives = value; }
        }

        public List<Player> players
        {
            get { return allPlayers; }
            set { allPlayers = value; }
        }
    
    
    }
}
